<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>日志管理</title>
    <link href="../../layui/css/layui.css" rel="stylesheet" type="text/css">
    <link href="../../css/style.css" rel="stylesheet" type="text/css">
    <script src="../../layui/layui.js"></script>
    <script src="../../js/jquery-1.8.3.js"></script>
    <script src="../../js/util.js"></script>
    <script>
        layui.use(['table', 'form', 'laydate','jquery','element'], function () {
            var table = layui.table;
            var form = layui.form;
            var $ = layui.$;
            var laydate=layui.laydate;
            var tabledata = {
                elem: "#table",//表格id
                id: "modelReload", //id
                url: '/oper/find',
                method: 'post',
                request: {
                    pageName: 'page',
                    limitName: 'limit'
                },
                response: {
                    statusName: 'code',
                    statusCode: 0,
                    msgName: 'msg',
                    countName: 'count',
                    dataName: 'data'
                },
                count: "count",
                limits: [10, 20, 30, 40, 50],
                layout: ['prev', 'page', 'next'],
                prev: "上一页",
                next: "下一页"
                , page: true //开启分页
                , cols: [[ //表头
                    {field: 'userName', title: '用户姓名',align:'center',width: '8%'}
                    , {field: 'msisdn', title: '手机号码',align:'center',width: '12%'}
                    , {field: 'dutyName', title: '级别',align:'center',width: '12%'}
                    // , {field: 'groupName', title: '归属组',align:'center'}
                    , {field: 'functionName', title: '操作功能',align:'center'}
                    , {field: 'typeName', title: '操作描述',align:'center',width: '10%'}
                    , {field: 'resultName', title: '结果',align:'center',width: '8%'}
                    , {field: 'operTime', title: '操作时间',align:'center'}
                    , {field: 'remark', title: '操作说明',align:'center',width: '22%'}
                ]]
            };
            table.render(tabledata);
            $('#find').on('click', function () {
                var index = layer.load(1, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });
                table.reload('modelReload', {
                    method: 'post',
                    page: {
                        curr: 1
                    },
                    where: {
                        msisdn: $("#msisdn").val(),
                        startTime:$("#startTime").val(),
                        endTime:$("#endTime").val()
                    }
                });
                layer.close(index);
            });
            laydate.render({
                elem: '#startTime'
            });
            laydate.render({
                elem: '#endTime'
            });
        });
    </script>
</head>
<body>
<div class="layui-content-body">
    <div class="scroll-box">
        <div class="breadcrumb-box">
              <span class="layui-breadcrumb" lay-separator="|">
   <a href="javascript:returnIndex2()">首页&nbsp;</a>
  <a href=""> &nbsp;系统管理&nbsp; </a>
  <a href=""> &nbsp;日志管理&nbsp; </a>
</span>
        </div>
        <div class="content-box">
            <div class="form-select-box">
                <div class="layui-form layui-form-pane" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号</label>
                            <div class="layui-input-block">
                                <input type="text" name="msisdn" lay-verify="required" autocomplete="off"
                                       class="layui-input" id="msisdn">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">操作时间</label>
                            <div class="layui-input-inline" style="width: 100px;">
                                <input type="text" name="date" id="startTime" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline" style="width: 100px;">
                                <input type="text" name="date" id="endTime" autocomplete="off"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn layui-btn-normal" id="find">查询</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="table-box">
                <table class="layui-table" style="width: 850px" id="table">
                </table>
            </div>
        </div>
    </div>
</div>
</body>
</html>
